package com.ban.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class myconfig implements WebMvcConfigurer {

 /*   @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
       // super.addResourceHandlers(registry);
    }*/

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("html/index");
        registry.addViewController("/commodity.html").setViewName("html/commodity");
        registry.addViewController("/buytoday.html").setViewName("html/buytoday");
        registry.addViewController("/information.html").setViewName("html/information");
        registry.addViewController("/about.html").setViewName("html/about");
        registry.addViewController("/login.html").setViewName("html/login");
        registry.addViewController("/shopcart.html").setViewName("html/shopcart");
    }
}
